Skip to content

chore: Switch to EnvironmentSensorManager for re-usability#1571

Draft
thebino wants to merge 2 commits intomeshcore-dev:devfrom
thebino:chore/t1000e-environmentSensorManager
Draft

chore: Switch to EnvironmentSensorManager for re-usability#1571
thebino wants to merge 2 commits intomeshcore-dev:devfrom
thebino:chore/t1000e-environmentSensorManager

Conversation

@thebino
Copy link

@thebino thebino commented Feb 2, 2026

Instead of duplicating custom logic for every hardware, it would be nice to re-use existing code where possible.
The already existing EnvironmentSensorManager is used by many variants and does a good job.
This PR added the hardware specifics where needed.

Baseline for #1564

@thebino thebino changed the base branch from main to dev February 2, 2026 08:01
@JDat
Copy link

JDat commented Feb 8, 2026

Why different hardware need to be in environment manager? Make environment manager platform independent and fine tune your platform in a way you need. Common code must be platform independent as much as possible.

@thebino
Copy link
Author

thebino commented Feb 8, 2026

Yes, thats what I did. Instead of 120 loc its now just 45 loc in the environment manager and no duplication anymore.

@JDat
Copy link

JDat commented Feb 8, 2026

Sorry if I overlooked, but... Who added T1000_GPS in EnvironmentSensors.cpp? Shouldn't it go to T1000 variant instead of Environment Sensors?

@fschrempf
Copy link
Contributor

I haven't looked at the details but I agree with @JDat. The code in EnvironmentSensors.cpp should be platform-/board-agnostic. Better add generic hooks in the board base class and call them from EnvironmentSensors.cpp if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants